import defineConfig from '@great/configs';
import path from 'path';

export default defineConfig({
    resolve: {
        alias: {
            '@': path.resolve(process.cwd(), './src')
        }
    },
    esbuild: {
        // drop: process.env.NODE_ENV === 'production' ? ['console'] : []
    },
    server: {
        port: 8000,
        host: true
    },
    preview: {
        port: 8080,
        proxy: {
            '/ruoyi': {
                target: 'http://10.2.2.16:8080',
                changeOrigin: true,
                rewrite: path => path.replace(/^\/ruoyi/, '')
            }
        }
    }
});
